package com.bcbim.smart_water_interface.point.service;

import com.bcbim.common.sys.Code;
import com.bcbim.smart_water_interface.line.VO.ListLineVO;
import com.bcbim.smart_water_interface.pipeManagement.dto.PipePointExcelDownload;
import com.bcbim.smart_water_interface.pipeManagement.vo.PipeLineListAppVO;
import com.bcbim.smart_water_interface.pipeManagement.vo.PipeListCodeVO;
import com.bcbim.smart_water_interface.pipeline.VO.PipelinePointVO;
import com.bcbim.smart_water_interface.point.DO.PipelinePointQuery;
import com.bcbim.smart_water_interface.point.VO.PipelinePointDataListVO;
import com.bcbim.smart_water_interface.point.VO.PipelinePointDataVO;
import com.bcbim.smart_water_interface.point.DO.PipelinePointDO;

import java.util.List;

/**
 * @Description: 管点数据管理service
 * @Author XueHao
 * @Date 2021/8/10
 * @Version V1.0
 **/
public interface PipelinePointService {

    /**
     * @return int
     * @Description 新增管点
     * @Author XueHao
     * @Date 2021/8/13
     */
    int insertPipelinePointData(PipelinePointDO pipelinePointDO);

    /**
     * @return List<Code>
     * @Description 获取道路下拉
     * @Author XueHao
     * @Date 2021/8/13
     */
    List<Code> getRolePull();

    /**
     * @return List<PipelinePointListVO>
     * @Description 查询管点数据列表
     * @Author XueHao
     * @Date 2021/8/13
     */

    List<PipelinePointDataListVO> listPipelinePointData(PipelinePointQuery query);

    /**
     * @return int
     * @Description 查询管点数据列表条数
     * @Author XueHao
     * @Date 2021/8/13
     */
    int getPipelinePointDataListCount(PipelinePointQuery query);

    /**
     * @return PipelinePointDataVO
     * @Description 查询管点数据详情
     * @Author XueHao
     * @Date 2021/8/13
     */
    PipelinePointDataVO getPipelinePointData(String id);

    /**
     * @return int
     * @Description 删除管点数据
     * @Author XueHao
     * @Date 2021/8/13
     */
    int removePipelinePointData(String id);

    /**
     * @return int
     * @Description 修改管点数据
     * @Author XueHao
     * @Date 2021/8/13
     */
    int updatePipelinePointData(PipelinePointDO pipelinePointDO);

    /**
     * @return PipelinePointVO
     * @Description 获取管线详情
     * @Author XueHao
     * @Date 2021/8/19
     */
    PipelinePointVO getPipelinePoint(String id);

    /**
     * 导入excel中的管点数据
     *
     * @param list 管点数据集合
     * @return int
     * @author wxc
     * @date 2021/9/1  10:14
     */
    int insertPointList(List<PipePointExcelDownload> list);

    /**
     * 获取需要导出的excel的数据通过id列表
     *
     * @param pipePointIdList 管点id集合
     * @return java.util.List<com.bcbim.pipeline_interface.pipeManagement.dto.PipeLineExcelDownload>
     * @author wxc
     * @date 2021/9/1  19:06
     */
    List<PipePointExcelDownload> getExcelPointList(List<String> pipePointIdList);

    /**
     * 搜索管网编号模糊查询管点
     *
     * @param code 管网编号
     * @return java.util.List<com.bcbim.pipeline_interface.pipeManagement.vo.PipeListCodeVO>
     * @author wxc
     * @date 2021/10/14
     */
    List<PipeListCodeVO> getPipelinePointByCode(String code);

    /**
     * 根据起始经度纬度 结束经度纬度 查询所属的管线
     *
     * @param startLat  开始纬度
     * @param startLong 开始经度
     * @param endLat    结束纬度
     * @param endLong   结束经度
     * @return java.util.List<com.bcbim.pipeline_interface.pipeManagement.vo.PipeLineListAppVO>
     * @author wxc
     * @date 2021/10/15
     */
    List<PipeLineListAppVO> listLineByLatLongApp(Double startLat, Double startLong, Double endLat, Double endLong);

    /**
     * @Description: 查询管井id
     * @Param: startPoint
     * @Return: String
     * @Author: ye
     * @Date: 2021/11/13
     */
    String getPointIdByCode(String startPoint);

    List<ListLineVO> getLineByPointId(String id);

    int countLineByPointId(String id);

    boolean checkPointCode(String code);

    void cleanPointCode(String id);

    int insertPoint(PipePointExcelDownload pipeLineExcelDownload);
}

